Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix conda environment yaml parsing errors #4078

Merged
merged 2 commits into from
Jan 15, 2025

Conversation

AyanSinhaMahapatra
Copy link
Member

@AyanSinhaMahapatra AyanSinhaMahapatra commented Jan 7, 2025

Tasks

  • Reviewed contribution guidelines
  • PR is descriptively titled 📑 and links the original issue above 🔗
  • Tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR
    Run tests locally to check for errors.
  • Commits are in uniquely-named feature branch and has no merge conflicts 📁
  • Updated documentation pages (if applicable)
  • Updated CHANGELOG.rst (if applicable)

Signed-off-by: Ayan Sinha Mahapatra <[email protected]>
@@ -51,6 +51,7 @@ def parse(cls, location, package_only=False):
primary_language=cls.default_primary_language,
dependencies=dependencies,
extra_data=extra_data,
is_private=True,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why private?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Conda environment YAMLs are ostly used to export a particular conda environment (this is like a lockfile used in projects) and to import the environment from them to replicate the conda environment. See https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-from-an-environment-yml-file and https://docs.conda.io/projects/conda/en/stable/user-guide/concepts/environments.html
This is not a manifest that you can publish a conda package, for that you need build recipes in meta.yaml files, since this manifest is not used to publish packages at all, and only publish environments, I've marked the packages created as private.

Copy link
Member

@pombredanne pombredanne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Just a few nits, wrt. repo URLs and private vs. public.

@@ -0,0 +1,3 @@
name: test
dependencies:
- https://104.17.92.24:443::flask=1.0.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the URL a namespace, or is is rather a repository_url qualifier?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is a repository URL qualifier allright, there are common ones like conda-forge, anaconda, bioconda and the URL is usually not specified fully, but denoted by just a reference word.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually I am not sure, this probably requires a bit more research, there are examples which seem more like a namespace, less like a repository URL:

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@AyanSinhaMahapatra AyanSinhaMahapatra merged commit b0aff52 into develop Jan 15, 2025
40 checks passed
@AyanSinhaMahapatra AyanSinhaMahapatra deleted the fix-package-scan-bugs branch January 15, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants